Added safeContains as an alternative to isIn.