Null check to prevent crasher