checkAttribute filter code