add nil protection for NSSet map method

This has caused me two crashes in beta, figured it was time to get it fixed.