fixed return value check for methods returning "void".