Add location.has_inventory, fixes #683

- Add a tag to check if the location has an inventory, copying the logic
from the function getInventory(), for use before reading
location.inventory
- Also, handle nulls appropriately in location.inventory to prevent
massive stacktraces