make sure nil isn't memoized and frozen

This is the first time I've made any proposed changes to our rails branch, so I'm both clueless about the process as well as how to get it bootstrapped to test the changes locally.  @josh - does the below seem a reasonable solution to https://github.com/github/github/issues/24904#issuecomment-41227539? I'll take a pass at testing it once I figure out how to get `rake test` to actually execute without error.