Fix empty url check

 Bug: 3213668
 Moved empty check after url fix and trim

Change-Id: I79422cae12eefa33db7a970c780db6c0cea16a28
1 file changed