SERVER-4928 Assert when type for regex pattern is not RegEx or String

Add check for type in regex operator, with matching test