More input validation