[Prevent] Ensure pointer is not NULL before it's referenced.