changed exception handling for hashable test