hasattr() returns False if an Exception is thrown.