Avoid memory leak

var noPin = new Error(), to compare directly and avoid casting and working with property