Add more input validation

Right that makes sense.