add checks for s-expr validity
more checks on validity