ISNULL tests the ColumnToTest for a NULL value. If the database entry is NULL it will be replaced with the ReplacementIfNull value. The return value is implicitly converted to the ColumnToTest value type if they types differ.
This would replace any NULL values in the table with 0 for the AVG calculation.