Adding a warning message to Location attribute() and adding protective checks against null pointers in attribute() methods.