null check and new lib