Fixed validation if no input is provided