Prevent possible NULL pointer access.