VUMC-92 Adding null pointer check to machine state in detach volume to prevent the null pointer that could occur otherwise