defend against bogus input