Added error handling for invalid account when accessing heirloom