The man was walking his dog on the beach