resolved #8 forgot to check for nullpointers before doing the converting