Nanoscale frictional behavior of graphene on SiO2 and Ni(111) substrates