handle null pointer. Update readme