made valueOf static for enum classes, fixed check of content-type