basic input checking