Fix wrong hasField() condition.