More input checking