Add attribute helper methods, casting

essentially replicates the same functions from the server side version