added tests for predicate and type checking