Prevent a null pointer access