Fix the thrown exception so the Styled* views can be properly previewed in Intellij

Change-Id: Ia0efc0e9b63ea9332c66efb2c5c1a7d664881218