Wrap isattr checks with try block