Check if input is valid

Good idea to start with validation now