Added a containsObject function.