Putting the Metaball panels in the Properties sidebar - object has no attribute meta_ball I want to display some content from the Properties Editor in the Properties Sidebar in the 3D view. Currently the Metaball panels.

As a first test i have grabbed the whole properties_data_metaball.py file for that, and simply changed the DataButtonsPanel class to show the stuff in the sidebar. Which is the only change at the file.

class DataButtonsPanel:
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_context = "data"


The panels shows in the sidebar, but the content is missing. And i get a AttributeError in the console. What do i overlook here?
Some context properties are only available to the 'PROPERTIES' space, particularly the data types context.mesh, context.speaker context.meta_ball to name a few.... Another would be be context.world. 

Simply use 

metaball = context.active_object.data


and in poll check that

context.active_object and context.active_object.type == 'META'