after running job is not prepared and fail with:

galaxy.jobs.runners ERROR 2016-06-19 18:46:16,257 (66) Failure preparing job
Traceback (most recent call last):
  File "/home/galaxy/lib/galaxy/jobs/runners/__init__.py", line 169, in prepare_job
    job_wrapper.prepare()
  File "/home/galaxy/lib/galaxy/jobs/__init__.py", line 889, in prepare
    self.command_line, self.extra_filenames, self.environment_variables = tool_evaluator.build()
  File "/home/galaxy/lib/galaxy/tools/evaluation.py", line 445, in build
    raise e
NotFound: cannot find 'is_of_type' while searching for 'is_of_type'

where part of  wrapper with is_of_type() is:

<command>
    <![CDATA[
           #if $reads.is_of_type('fastq'):
                ln -s "$reads" rInput1.fq &&
                #set $reads = 'rInput1.fq'
           #end if
 ...

where am I wrong? Or that is a Galaxy bug?
Galxy is 16.04 and is_of_type() function is defined in lib/galaxy/tools/wrappers.py

Thanx,
Nikolaos