javascript test if property exists