Fix corner case in input checks