javascript test if property exists in object