fix the if statement which checks if the drug block is an array or not