validating prompts

validating prompts using simple if statement