AFM analysis of MgB2 films and nanostructures