Update:
I have solved it but, the problem is, I'm encountering some difficulties to maintain the category layout from the functions. However, the good news is, I have successfully removed the empty URL titles entirely from the category box as requested above.
That said, the categories needs to be called from two seperated basis from the same general function. It is a little bit hard to code as, hopefully, the results will be posted soon.