Will return 0 if $propertyId is not an int. There is nothing that prevents it from being "Applepie", is there? This needs to be checked and handled.