Adding class modifier solved the problem. There will a compiler error if an integer is passed.