add missing guard

related to PR 13741
tighten up the contract for get-display-size and get-display-left-top-inset