fixing default/required check to check for None