Implemented checking for KeyAttribute for a given type