Test if the mouse is over any object in the 3D View with python?
There's no property or function to find it out, there's an example script to find mesh objects under the mouse however. It casts a ray on LMB and selects an object if there is one (only mesh objects and duplis).

You find the script in the built-in Text Editor, in the menu:

Templates > Python > Operator Modal View3D Raycast

AFAIK it can't be changed to also hit objects like lamps and cameras, 'cause they don't have actual faces (they are kind of virtual objects only).

If you tell more about your ultimate goal, we might find a different approach that doesn't require to know whether there's something under the mouse cursor or not.