added null pointer check
updated readme
update readme