`saveRelations` returning `null`
You're getting null back simply because the saveRelations() method doesn't actually return anything.

If you need to return true from addCategoryRelation if the relations are successfully saved, or possibly an error message (or false) if they aren't, you can consider wrapping the call to saveRelations() in a try/catch block – something like this should work:

public function addCategoryRelation(CategoryModel $category, EntryModel $entry)
{
    ...
    if (in_array($entry-&gt;id, array_values($relationsIds))) {
        return [
            'error' =&gt; 'Entry already saved.',
        ];
    }
    try {
        $relationsIds[] = $entry-&gt;id;
        return craft()-&gt;relations-&gt;saveRelations($field, $category, $relationsIds);
    } catch (\Exception $e) {
        // Something went wrong – return `false` or an error message, log the exception?
        return false;
    }
    return true;
}