get njobs from queue Handling None return