Fix unchecked None bug.