Checks if there is value in input before running.