Tom Hanks almost landed a role as the male nanny in 'Friends'