search: add invalid attribute value check