Safe investment? or safe to live?
Harlem is as safe as any other neighborhood in the city, but property values have been near the apex for some time so the value is not the same where it was say 3 years back. However, there are different enclaves within Harlem that you can look at for comparison, you have Spanish Harlem, Harlem proper, Sugar Hill, Strivers Row (arguably the most beautiful block in NYC), etc...
Good luck with your search!