Improved error handling when resolving css class for given style