Filter out keys with empty values

/cc @shadyvb please review

Resolves #231