javascript check if property exists question mark