Added checks and tests for Location entity

Added type checks when setting the `$name` and `$enabled` properties of the Location entity. (Added tests for the checks.)