casting functionality + select2.js