Added log message for null pointer