fix subject_average

Checks if the returned result from redis is `nil`, and if so, returns `nil`, so it does not try to divide it.