Check for and validate input

Checks for input to eliminate the 'undefined key' error that was occurring on the initial load of the page due to $_GET['scale'] and $_GET['degree'] being used before they exist.

Also added a check on the input to verify that it is not NULL or NaN. Prints an error message if and until the input is valid.