                 
                 // validate NSUInteger bitmask
                 
-                if optionNumber == nil || optionNumber != NSComparisonPredicateOptions.NormalizedPredicateOption.rawValue || optionNumber != NSComparisonPredicateOptions.DiacriticInsensitivePredicateOption.rawValue || optionNumber != NSComparisonPredicateOptions.CaseInsensitivePredicateOption.rawValue {
+                if optionNumber == nil || (optionNumber != NSComparisonPredicateOptions.NormalizedPredicateOption.rawValue && optionNumber != NSComparisonPredicateOptions.DiacriticInsensitivePredicateOption.rawValue && optionNumber != NSComparisonPredicateOptions.CaseInsensitivePredicateOption.rawValue) {
                     
                     let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
                     

            var value: AnyObject?
            
            // one of these will be nil
            let relationshipDescription: NSRelationshipDescription? = entity.relationshipsByName[predicateKey!] as? NSRelationshipDescription
            
            let attributeDescription: NSRelationshipDescription? = entity.attributesByName[predicateKey!] as? NSRelationshipDescription
            
            // validate that key is attribute or relationship
            if (relationshipDescription == nil) && (attributeDescription == nil) {

        // set new values from dictionary
        context.performBlockAndWait({ () -> Void in
            
            managedObject!.setValuesForKeysWithDictionary(newValues)
        })
        
        // perform Core Data validation (to make sure there will be no errors saving)
