`apply_method` to handle keyword argument better

Variables given as keyword arguments were not noticed by the
`apply_method` decorator before. This commit fixes that. In addition
the case when an output is not a Theano variable is checked.