Add error check if arg is nil