only returns dependencies if they exist, otherwise return nothing