Prevent "AttributeError" in the console