Check type when using array_search
Clean