Fix for caching empty assets

`function assets` returns style and script tags even if I pass assets of only one type to it. With this commit it checks result of compilation and returns tag only if this result is not empty.