How do I get an Actor's static mesh?

Hi. This is like three years from the original answer, but consider using the public function GetStaticMesh() instead of ->StaticMesh. I got an error. Thanks.