Only raise if paginator is null in api/packages

Raise the invalid API usage exception, only if the paginator object
could not be created. If the query did not return any items simply let
the code return an empty json list.

This makes nodes and packages behave identical.

Signed-off-by: Christoph Kassen <c.kassen@telekom.de>