Add check to get_data attribute