check if request is set before using it