Removed condition from `contains` as `indexOf` already does the same check.