How to check css property already present in an element in javascript

I have a div

<div id="myDiv" style="border:1px solid white; width:20px; height: 100px">....</div>

now in Js, if border css property is already present I need to remove that by using

let element = document.getElementById("myDiv")
element.style.removeProperty("border");

if border css property not present, need to add

let element = document.getElementById("myDiv")
element.style.border = '1px solid white'

but, How to check whether the css property(border) exists or not in element(myDiv)