added checks for enums in search