php doesn't like testing for undefined variables