you can check if the reminder of the width and height of your document is 0 like this:
var wdth = app.activeDocument.width;
var hght = app.activeDocument.height;
if(wdth % 4 == 0){
alert("width is divisible by 4");
}else{
alert("width is not divisible by 4");
}