Not the best way to do it, but null check