handle null values

should close #4