Added null check in SubStatement asVersion