Log as error for null pointer