Fix type predicate for undefined attribute