Avoid reflection idiomatically.

See https://gist.github.com/noahlz/5943779