Simplifying input type conditionals