add logic to deal with null bytestrings
Merge pull request #19 from square/sunil/null-bytestrings

add logic to deal with null bytestrings