Don't dereference NULL pointers