Checking for an invalid key doesn't raise an error with Jinja so this method should be fine.