prevent a null pointer exception (safe)