Made the checks consistent using in_array.