Added basic input check