Handle NoneType in small_count