Fixes #15 by checking that the provided className is valid

and provide an informative error message if not.