Add checking to inputs