Added condition for empty inlines

Handle when inlines are empty.