catch some invalid inputs