Do nothing on empty lines.
Check that there is space left on the stack before pushing.