Hasattr instead of try/except for rasterplot