Refactor whitelisted types (String, Bool, Int, Float, ...) handling.