Remove unnessacery annotations, add npe check