updated order helper to handle the case where there is no user