Add checks that input exists and is valid.