Added input type tests and fixed check if input is not a valid number