pts: add some sanity checks in ptuser.c