Added check for null