test for property pressence first, prevent php warning