List l = getArrayListObject(); if (null == l) throw new Exception("The list is empty");