can do an explicit test and avoid a try/except