How can I check if the active object is a mesh and selected? I want to check if the active object is a mesh before I UV unwrap it. Here's my code and for some reason the execute runs even when a mesh is not selected. What am I missing?

@classmethod
def poll(cls, context):
    our_case = False
    selected = context.selected_objects
    object = context.active_object
    if object is None: return False
    if object.mode == "OBJECT" and all(obj.type == "MESH" for obj in selected):
        return True 
    return our_case

def execute(self, context):                  

    bpy.ops.uv.smart_project(angle_limit=30, island_margin=0.06)
    return {'FINISHED'}
Here's what I ended up with that worked:

@classmethod
def poll(cls, context):
    obj = context.active_object
    objs = context.selected_objects
    if len(objs) == 0: return False
    if obj.type == 'MESH': return True
    return False