null pointer fix search