Null check to avoid NPE
Fixed replacement of file transfer type in groovy file