Prevent refernce of NULL pointer