Fix potential JS error triggered from conditional logic if acf is not available

Signed-off-by: Elliot Condon <e@elliotcondon.com>