Added check for null score values.